<!-- 核对完成
采购单界面中可以实现如下操作:
  // <<< XX仓库 >>> XX表示原料\包材\线缆
  // XX仓库>待入库采购单
  waitInStoreByPurchaseOrder: 'waitInStoreByPurchaseOrder',
  // XX仓库>已入库采购单
  completedInStoreByPurchaseOrder: 'completedInStoreByPurchaseOrder',

  // <<<采购中心>>>
  // 采购中心>原料待发货采购单(等待发货的采购单)
  waitDeliverByPurchaseOrder: 'waitDeliverByPurchaseOrder',
  // 采购中心>原料进行中采购单(已经发货的采购单)
  inProgressDeliverByPurchaseOrder: 'inProgressDeliverByPurchaseOrder',
  // 采购中心>原料已完成采购单(完成发货的采购单)
  completedDeliverByPurchaseOrder: 'completedDeliverByPurchaseOrder',
-->

<template>
	<a-card :bordered="false">
		<div class="table-page-search-wrapper">
			<a-form layout="inline">
				<a-row :gutter="48">

					<a-col :md="8" :sm="24">
						<a-form-item label="采购单号">
							<a-input v-model="queryParam.orderNumber" placeholder="请输入采购单号" />
						</a-form-item>
					</a-col>
					<a-col :md="8" :sm="24">
						<a-form-item label="物料编码">
							<a-input v-model="queryParam.jzMaterialCode" placeholder="请输入物料编码" />
						</a-form-item>
					</a-col>
					<a-col :md="4" :sm="24" v-show="false">
						<!--            <a-input v-model="queryParam.orderType" placeholder="请输入订单类型"/>-->
						<a-form-item label="订单类型">
							<a-select :default-value="orderType" v-model="queryParam.orderType" style="width: 120px">
								<a-select-option :value="item.id" v-for="(item, index) in orderTypeList">
									{{ item.name }}
								</a-select-option>
							</a-select>
						</a-form-item>
					</a-col>

					<a-col :md="4" :sm="24" v-show="false">
						<a-form-item label="执行状态">
							<a-select :default-value="executeStatus" v-model="queryParam.executeStatus" style="width: 120px">
								<a-select-option :value="id" v-for="{ id, name, code } in executeStatusList">
									{{ name }}
								</a-select-option>
							</a-select>
						</a-form-item>
					</a-col>

					<a-col :md="8" :sm="24"
						v-if="viewState == $util.EMS_ORDER_VIEW_STATE.waitInStoreByPurchaseOrder || viewState == $util.EMS_ORDER_VIEW_STATE.completedInStoreByPurchaseOrder">
						<a-form-item label="采购时间">
							<!-- {{queryParam.createTime}} -->
							<a-range-picker v-model="queryParam.createTime" style="width:100%" format="YYYY-MM-DD"
								value-format="YYYY-MM-DD HH:mm:ss"
								:showTime="{ defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')] }" />
						</a-form-item>
					</a-col>

					<a-col :md="!advanced && 8 || 24" :sm="24">
						<span class="table-page-search-submitButtons"
							:style="advanced && { float: 'right', overflow: 'hidden' } || {}">
							<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
							<!--<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>-->
						</span>
					</a-col>

					<a-col :md="24" :sm="24" v-if="canReadOrgIdCompany()">
						<a-form-item label="供应商：">
							<!-- <a-radio-group default-value="" button-style="solid" v-model="queryParam.orgIdSupplier">
								<a-radio-button value="">
									全部
								</a-radio-button>
								<a-radio-button :value="id"
									v-for="{ id, name } in $util.getOrgList([$businessEnum.ORG_TYPE_ENUM.PRIMARY_SUPPLIER.id, $businessEnum.ORG_TYPE_ENUM.NORMAL_SUPPLIER.id])">
									{{ name }}
								</a-radio-button>
							</a-radio-group> -->
							<FCOrgRadioGroup1 v-model="queryParam.orgIdSupplier" :filter-types="materialType" />
						</a-form-item>
					</a-col>

					<!-- <a-col :md="24" :sm="24">
            <a-form-item label="归属公司：">
              <a-radio-group default-value="" button-style="solid" v-model="queryParam.orgIdCompany">
                <a-radio-button value="">
                  全部
                </a-radio-button>
                <a-radio-button :value="id" v-for="{id, name} in $util.getOrgList([$businessEnum.ORG_TYPE_ENUM.COMPANY.id])">
                  {{ name }}
                </a-radio-button>
              </a-radio-group>

            </a-form-item>
          </a-col> -->

				</a-row>
			</a-form>
			<Export text="导出" title="待入库采购单" url="/emsOrder/cgDRKExport" :obj="{
				materialType: materialType,
				orderType: orderType,
				executeStatus: executeStatus,
				orderNumber: queryParam.orderNumber,
				jzMaterialCode: queryParam.jzMaterialCode,
				orgIdSupplier: queryParam.orgIdSupplier,
				startTime: appendTime(queryParam.createTime)[0],
				endTime: appendTime(queryParam.createTime)[1],
			}" />
		</div>

		<div class="table-operator" style="height: 32px;">
			<!--   发货     -->
			<a-button v-if="viewState == $util.EMS_ORDER_VIEW_STATE.waitDeliverByPurchaseOrder" icon="plus" type="primary"
				style="float: right;" @click="$refs.deliverOrderAddForm.add({ orderType, orders: selectedRows })">发货
			</a-button>
		</div>

		<s-table ref="table" size="default" :columns="columnsDynamic" :data="loadData" :alert="true"
			:rowKey="(record) => record.code" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">

			<!--   生产单池中修改订单状态用   -->
			<span slot="status" slot-scope="text, record">
				<a-switch v-model:checked="record.status == 0" :loading="record.loading"
					@change="onOrderStatusChange($event, record)" />
			</span>
			<span slot="isCgrkAbnormal" slot-scope="text, record">
				<span v-if="record.isCgrkAbnormal == 1">正常</span>
				<span v-if="record.isCgrkAbnormal == 2" style="color: red">异常</span>
			</span>
			<span :slot="$util.EMS_ORDER_VIEW_STATE.waitInStoreByPurchaseOrder" slot-scope="text, record">
				<!-- <template v-if="record.targetOrgType == $businessEnum.ORG_TYPE_ENUM.NORMAL_SUPPLIER.id">
            <a @click="$refs.normalSupplierPurchaseOrderAddInStoreOrderForm.show(record,
            {materialType,viewState:$refs.normalSupplierPurchaseOrderAddInStoreOrderForm.viewStateEnum.add})">
              完成入库123
            </a>
            <a-divider type="vertical"/>
          </template>
<a @click="$refs.purchaseOrderOfInStoreInfoForm.show(record, {materialType})">
	入库记录333
</a> -->
				<a @click="$refs.entryForm.show(record, { materialType })" style="margin: 10px;">
					去入库
				</a>
				<a @click="$refs.detailForm1.show(record, { materialType })" style="margin: 10px;">
					入库明细
				</a>
				<a @click="$refs.rukuList.show(record, { materialType, orderType, })" style="margin: 10px;">
					入库记录
				</a>
			</span>

			<span :slot="$util.EMS_ORDER_VIEW_STATE.completedInStoreByPurchaseOrder" slot-scope="text, record">
				<!-- <a @click="$refs.purchaseOrderOfInStoreInfoForm.show(record,
          {materialType,viewState:$refs.purchaseOrderOfInStoreInfoForm.normalSupplier})">入库详情111</a> -->
				<a @click="$refs.detailForm1.rukuDetails(record,
					{ materialType })" style="margin: 10px;">入库明细</a>
				<a @click="$refs.rukuList.show(record,
					{ materialType, orderType })" style="margin: 10px;">入库记录</a>
			</span>

			<span :slot="$util.EMS_ORDER_VIEW_STATE.waitDeliverByPurchaseOrder" slot-scope="text, record">
				<a
					@click="$refs.orderMaterialModal.show(record, $util.EMS_ORDER_MATERIAL_VIEW_STATE.waitDeliverByProductionMaterial, { materialType })">发货明细</a>
			</span>

			<span :slot="$util.EMS_ORDER_VIEW_STATE.inProgressDeliverByPurchaseOrder" slot-scope="text, record">
				<a @click="$refs.deliverOrderDetailForm.show(record)">完结（新增的？）</a>
				<a-divider type="vertical" />
				<a @click="$refs.deliverOrderDetailForm.show(record)">发货明细</a>
			</span>

			<span :slot="$util.EMS_ORDER_VIEW_STATE.completedDeliverByPurchaseOrder" slot-scope="text, record">
				<a @click="$refs.deliverOrderDetailForm.show(record)">发货明细</a>
			</span>


		</s-table>

		<!--    // XX仓库>待入库采购单>完成入库(非主要供应商的采购单入库操作页)  普通供应商采购单执行入库的操作页  -->
		<normal-supplier-purchase-order-add-in-store-order-form ref="normalSupplierPurchaseOrderAddInStoreOrderForm" />
		<!--  // XX仓库>待入库采购单>入库记录(采购单中物料的发货\入库情况详情页)  采购单的入库相关信息页  -->
		<purchase-order-of-in-store-info-form ref="purchaseOrderOfInStoreInfoForm" />

		<!--  采购单发货单操作页  -->
		<deliver-order-add-form ref="deliverOrderAddForm" />
		<!--  采购单发货单详情页  -->
		<deliver-order-detail-form ref="deliverOrderDetailForm" />

		<!--  统一的物料Modal页  -->
		<order-material-modal ref="orderMaterialModal" />

		<detail-form1 ref="detailForm1" />
		<ruku-list ref="rukuList" />
		<entry-form ref="entryForm" @ok="handleOk"></entry-form>
	</a-card>
</template>

<script>
import { STable } from '@/components'
import { page, changeStatus, del, pageByPurchaseOrderWaitingDeliver, } from '@/api/modular/main/emsorder/emsOrderManage'
import { list as emsOrgList } from '@/api/modular/main/emsorg/emsOrgManage'
import { EMS_ORDER_VIEW_STATE, getUrlParam } from '@/utils/util'
import moment from 'moment'

// 采购单使用的页面
import normalSupplierPurchaseOrderAddInStoreOrderForm from '@/views/main/emsordermaterial/purchaseOrder/normalSupplierPurchaseOrderAddInStoreOrderForm'
import purchaseOrderOfInStoreInfoForm from '@/views/main/emsordermaterial/purchaseOrder/purchaseOrderOfInStoreInfoForm'
import orderMaterialModal from '@/views/main/emsordermaterial/emsOrderMaterialModal'

// 发货操作单\明细页
import deliverOrderAddForm from '@/views/main/emsordermaterial/deliverOrder/emsDeliverAddForm'
import deliverOrderDetailForm from '@/views/main/emsordermaterial/deliverOrder/emsDeliverDetailForm'
import { mapGetters } from 'vuex'

import detailForm1 from '../../materialManagement/purchaseOrderByWaitInStore/detailForm1'
import rukuList from '../../materialManagement/purchaseOrderByWaitInStore/rukuList'
import entryForm from '../../materialManagement/purchaseOrderByWaitInStore/entryForm'
import FCOrgRadioGroup1 from '@/components/FcOrgRadioGroup/FCOrgRadioGroup1'

export default {
	components: {
		STable,
		normalSupplierPurchaseOrderAddInStoreOrderForm,
		purchaseOrderOfInStoreInfoForm,
		deliverOrderAddForm,
		deliverOrderDetailForm,
		orderMaterialModal,
		detailForm1,
		rukuList,
		entryForm,
		FCOrgRadioGroup1
	},
	data() {
		return {
			advanced: false, // 高级搜索 展开/关闭
			queryParam: {},  // 查询参数
			columns: [       // 表头
				{
					title: '订单号',
					dataIndex: 'orderNumber'
				},
				{
					title: '订单类型',
					dataIndex: 'orderTypeStr'
				},
				{
					title: '是否可用',
					dataIndex: 'status',
					scopedSlots: { customRender: 'status' }
				},
				{
					title: '进度状态',
					dataIndex: 'executeStatusStr'
				},
				{
					title: '创建时间',
					dataIndex: 'createTime'
				},
				{
					title: '操作',
					dataIndex: 'action',
					width: '150px',
					scopedSlots: { customRender: 'action' }
				}
			],
			// 加载数据方法 必须为 Promise 对象
			loadData: parameter => {
				// TODO 在查询下面这几个菜单时,需要增加机构限制.但这样做不好,后面改为服务端限制
				// if (this.$util.EMS_ORDER_VIEW_STATE.waitDeliverByPurchaseOrder
				//   || this.$util.EMS_ORDER_VIEW_STATE.inProgressDeliverByPurchaseOrder
				//   || this.$util.EMS_ORDER_VIEW_STATE.completedDeliverByPurchaseOrder) {
				//   this.queryParam.targetOrgId = this.userInfo.orgId
				// }		
				let _queryParam = Object.assign({}, this.queryParam)
				if (_queryParam.createTime?.[0]) {
					_queryParam.createTimeStart = moment(_queryParam.createTime?.[0]).format('YYYY-MM-DD HH:mm:ss')
				}
				if (_queryParam.createTime?.[1]) {
					_queryParam.createTimeEnd = moment(_queryParam.createTime?.[1]).format('YYYY-MM-DD HH:mm:ss')
				}
				this.queryParam.sourceOrderMaterialId = 0
				delete _queryParam.createTime
				return page(Object.assign(parameter, _queryParam)).then((res) => {
					return res.data
				})
			},
			scheduleProductionVisible: false,
			selectedRowKeys: [],
			selectedRows: [],
			defaultExpandedKeys: [],
			replaceFields: {
				key: 'id',
			},
			urlParam: {},
			columnsType: '',
			viewState: '',
			materialType: '',
		}
	},
	computed: {
		...mapGetters(['userInfo']),
		routePath() {
			let urlParam = getUrlParam(this.$route.path)
			return urlParam
		},
		materialTypeUrlParam() {
			return this.routePath.materialType
		},
		materialTypeEnum() {
			return this.$util.findMaterialTypeById(this.materialType)
		},
		orderType() {
			return this.routePath.orderType
		},
		orderTypeList() {
			let result = []
			result.push({ id: '', name: '全部', code: 'all' })
			for (const key in this.$businessEnum.ORDER_TYPE_ENUM) {
				let value = this.$businessEnum.ORDER_TYPE_ENUM[key]
				result.push(value)
			}
			return result
		},
		executeStatus() {
			return this.urlParam.executeStatus
		},
		executeStatusList() {
			let result = []
			result.push({ id: '', name: '全部', code: 'all' })
			for (const key in this.$businessEnum.EXECUTE_STATUS_ENUM) {
				let value = this.$businessEnum.EXECUTE_STATUS_ENUM[key]
				result.push(value)
			}
			return result
		},
		columnsDynamic() {
			switch (this.viewState) {
				// <<< XX仓库 >>> XX表示原料\包材\线缆
				// XX仓库>待入库采购单
				case this.$util.EMS_ORDER_VIEW_STATE.waitInStoreByPurchaseOrder:
					if (this.canReadOrgIdCompany()) {
						return [
							{
								title: '序号', width: '80px',
								customRender: (text, record, index) => `${index + 1}`
							},
							{
								title: '采购单号',
								dataIndex: 'orderNumber'
							},
							// {
							//   title: '供应商',
							//   dataIndex: 'targetOrgName'
							// },
							// {
							//   title: '归属子公司',
							//   dataIndex: 'orgName'
							// },
							// {
							//   title: '采购数量',
							//   dataIndex: '',
							//   customRender: (text, record, index) => `【没算】`
							// },
							// {
							//   title: '已到数量',
							//   dataIndex: '',
							//   customRender: (text, record, index) => `【没算】`
							// },
							{
								title: '采购时间',
								dataIndex: 'createTime'
							},
							{
								title: '操作',
								dataIndex: 'action',
								width: '300px',
								scopedSlots: { customRender: this.$util.EMS_ORDER_VIEW_STATE.waitInStoreByPurchaseOrder }
							}
						]
					} else {
						return [
							{
								title: '序号', width: '80px',
								customRender: (text, record, index) => `${index + 1}`
							},
							{
								title: '采购单号',
								dataIndex: 'orderNumber'
							},
							{
								title: '供应商',
								dataIndex: 'targetOrgName'
							},
							// {
							//   title: '归属子公司',
							//   dataIndex: 'orgName'
							// },
							// {
							//   title: '采购数量',
							//   dataIndex: '',
							//   customRender: (text, record, index) => `【没算】`
							// },
							// {
							//   title: '已到数量',
							//   dataIndex: '',
							//   customRender: (text, record, index) => `【没算】`
							// },
							{
								title: '采购时间',
								dataIndex: 'createTime'
							},
							{
								title: '操作',
								dataIndex: 'action',
								width: '250px',
								scopedSlots: { customRender: this.$util.EMS_ORDER_VIEW_STATE.waitInStoreByPurchaseOrder }
							}
						]
					}
				// XX仓库>已入库采购单
				case this.$util.EMS_ORDER_VIEW_STATE.completedInStoreByPurchaseOrder:
					return [
						{
							title: '序号', width: '80px',
							customRender: (text, record, index) => `${index + 1}`
						},
						{
							title: '采购单号',
							dataIndex: 'orderNumber'
						},
						{
							title: '供应商',
							dataIndex: 'targetOrgName'
						},
						// {
						//   title: '总数量',
						//   dataIndex: '',
						//   customRender: (text, record, index) => `【没算】`
						// },
						// {
						//   title: '实到数量',
						//   dataIndex: '',
						//   customRender: (text, record, index) => `【没算】`
						// },
						{
							title: '采购开始时间',
							dataIndex: 'createTime'
						},
						{
							title: '入库完成时间',
							dataIndex: 'updateTime',
						},
						{
							title: '状态',
							dataIndex: '',
							scopedSlots: { customRender: 'isCgrkAbnormal' }
							// customRender: (text, record, index) => record.isCgrkAbnormal == 1 ? '正常' : '异常'
						},
						{
							title: '操作',
							dataIndex: 'action',
							width: '250px',
							scopedSlots: { customRender: this.$util.EMS_ORDER_VIEW_STATE.completedInStoreByPurchaseOrder }
						}
					]

				// <<<采购中心>>>
				// 采购中心>原料待发货采购单(等待发货的采购单) //去掉
				case this.$util.EMS_ORDER_VIEW_STATE.waitDeliverByPurchaseOrder:
					return [
						{
							title: '序号', width: '80px',
							customRender: (text, record, index) => `${index + 1}`
						},
						{
							title: '采购单号',
							dataIndex: 'orderNumber'
						},
						{
							title: '供应商',
							dataIndex: 'targetOrgName'
						},
						// {
						//   title: '采购数量',
						//   dataIndex: '',
						//   customRender: (text, record, index) => `【没算】`
						// },
						// {
						//   title: '已发数量',
						//   dataIndex: '',
						//   customRender: (text, record, index) => `【没算】`
						// },
						{
							title: '采购时间',
							dataIndex: 'createTime'
						},
						{
							title: '操作',
							dataIndex: 'action',
							width: '250px',
							scopedSlots: { customRender: this.$util.EMS_ORDER_VIEW_STATE.waitDeliverByPurchaseOrder }
						}
					]
				// 采购中心>原料进行中采购单(已经发货的采购单)
				case this.$util.EMS_ORDER_VIEW_STATE.inProgressDeliverByPurchaseOrder:
					return [
						{
							title: '序号111', width: '80px',
							customRender: (text, record, index) => `${index + 1}`
						},
						{
							title: '采购单号',
							dataIndex: 'orderNumber'
						},
						{
							title: '采购数量',
							dataIndex: ''
						},
						{
							title: '实发数量',
							dataIndex: ''
						},
						{
							title: '状态',
							dataIndex: 'status'
						},
						{
							title: '操作',
							dataIndex: 'action',
							width: '250px',
							scopedSlots: { customRender: this.$util.EMS_ORDER_VIEW_STATE.inProgressDeliverByPurchaseOrder }
						}
					]
				// 采购中心>原料已完成采购单(完成发货的采购单) //已去掉
				case this.$util.EMS_ORDER_VIEW_STATE.completedDeliverByPurchaseOrder:
					return [
						{
							title: '序号1111', width: '80px',
							customRender: (text, record, index) => `${index + 1}`
						},
						{
							title: '采购单号',
							dataIndex: 'orderNumber'
						},
						{
							title: '采购数量',
							dataIndex: ''
						},
						{
							title: '实发数量',
							dataIndex: ''
						},
						{
							title: '采购时间',
							dataIndex: 'createTime'
						},
						{
							title: '入库完成时间',
							dataIndex: ''
						},
						{
							title: '操作',
							dataIndex: 'action',
							width: '250px',
							scopedSlots: { customRender: this.$util.EMS_ORDER_VIEW_STATE.completedDeliverByPurchaseOrder }
						}
					]
				default:
					return []
			}
		}
	},
	watch: {
		'$route.path': function (newValue) {
			let urlParam = getUrlParam(this.$route.path)
			this.urlParam = urlParam
			this.setParam(urlParam)

			setTimeout(() => {
				this.$refs.table.refresh(true)
				this.$refs.table.clearSelected()
			}, 100)
		}
	},
	created() {
		let urlParam = getUrlParam(this.$route.path)
		this.urlParam = urlParam
		this.setParam(urlParam)
	},
	methods: {
		moment,
		setParam: function (urlParam) {
			let { orderType, executeStatus, columnsType, viewState, materialType, refCount } = urlParam
			this.columnsType = columnsType
			this.viewState = viewState
			this.materialType = materialType
			this.queryParam = {}
			this.queryParam.materialType = materialType
			this.queryParam.orderType = orderType || ''


			console.log(viewState);

			if (viewState === this.$util.EMS_ORDER_VIEW_STATE.waitDeliverByPurchaseOrder) {
				this.queryParam.refCount = 0
			} else if (viewState === this.$util.EMS_ORDER_VIEW_STATE.inProgressDeliverByPurchaseOrder) {
				this.queryParam.refCount = 0x7fffffff
			} else if (viewState === this.$util.EMS_ORDER_VIEW_STATE.completedDeliverByPurchaseOrder) {
				this.queryParam.refCount = null
			} else if (viewState === this.$util.EMS_ORDER_VIEW_STATE.completedInStoreByPurchaseOrder) {//已入库
				this.queryParam.cgApplyType = 3;
			} else if (viewState === this.$util.EMS_ORDER_VIEW_STATE.waitInStoreByPurchaseOrder) {//待入库
				this.queryParam.executeStatuses = executeStatus || ''
				this.queryParam.cgApplyType = 1;
			} else {
				this.queryParam.refCount = null
			}
		},
		canReadOrgIdCompany() {
			return !this.hasRole(this.$util.ROLE_ENUM.GS_ADMIN.id)
				&& !this.hasRole(this.$util.ROLE_ENUM.MATERIAL_ADMIN3.id)
				&& !this.hasRole(this.$util.ROLE_ENUM.MATERIAL_ADMIN2.id)
				&& !this.hasRole(this.$util.ROLE_ENUM.MATERIAL_ADMIN2.id)
				&& !this.hasRole(this.$util.ROLE_ENUM.SQCG.id)
		},
		del(record) {
			del(record).then((res) => {
				if (res.success) {
					this.$message.success('删除成功')
					this.$refs.table.refresh()
				} else {
					this.$message.error('删除失败：' + res.message)
				}
			}).catch((err) => {
				this.$message.error('删除错误：' + err.message)
			})
		},
		toggleAdvanced() {
			this.advanced = !this.advanced
		},
		handleOk() {
			this.$refs.table.refresh()
		},
		onSelectChange(selectedRowKeys, selectedRows) {
			this.selectedRowKeys = selectedRowKeys
			this.selectedRows = selectedRows
		},
		onOrderStatusChange(checked, row) {
			row.loading = true
			let { orderId } = row
			let status = checked ? 0 : 1
			let parameter = { orderId, status }
			changeStatus(parameter).then(res => {
				this.handleOk()
			})
		},
		// 排单生产
		handleScheduleProductionShow() {
			if (this.validateScheduleProduction()) {
				this.scheduleProductionVisible = true
			}
		},
		validateScheduleProduction() {
			let selectedRows = this.selectedRows
			if (selectedRows.length == 0) {
				this.$message.error('请先选择要排单生产的订单')
				return false
			}
			let unavailableOrders = selectedRows.filter(value => value.status != 0)
			if (unavailableOrders.length > 0) {
				this.$message.error('订单状态必须为"可用"才可以进行排单')
				return false
			}
			return true
		},
	}
}
</script>

<style lang="less">
.table-operator {
	margin-bottom: 18px;
}

button {
	margin-right: 8px;
}
</style>
